function setCookie(e, t, o, n, i) {
    var a = new Date;
    a.setTime(a.getTime() + 24 * o * 60 * 60 * 1e3), document.cookie = e + "=" + escape(t) + (o ? ";expires=" + a.toGMTString() : "") + (n ? ";path=" + n : "") + (i ? ";domain=" + i : "") }

function setlongcookie(e, t) { document.cookie = e + "=" + t + ";expires=Sat, 1 Feb 3000 00:00:00 GMT" }

function getCookie(e) {
    return $.cookie(e) }

function deleteCookie(e) { document.cookie = e + "=;expires=" + new Date(0).toGMTString() }

function getQueryString(e) {
    var t = new RegExp("(^|&)" + e + "=([^&]*)(&|$)", "i"),
        o = window.location.search.substr(1).match(t);
    return null != o ? unescape(o[2]) : "" }

function openclient(e) {
    var t = Date.now(),
        o = document.createElement("iframe");
    o.src = ua.indexOf("os") > 0 ? config.scheme_IOS : config.scheme_Adr, o.style.display = "none", document.body.appendChild(o);
    var n = setTimeout(function() {
        var o = Date.now();
        return !t || o - t < config.timeout + 200 ? (window.location = e, !1) : void 0 }, config.timeout);
    window.onblur = function() { clearTimeout(n) } }

function gotodown() {
    var e = "m";
    1 == isios && (e = "ios"), 1 == isandroid && (e = "android"), MBase.m.maidian({ lt: "appdowns", downt: e });
    var t = "";
    t = isios ? "micromessenger" == ua.match(/MicroMessenger/i) ? "http://a.app.qq.com/o/simple.jsp?pkgname=com.biyao.fu" : "http://itunes.apple.com/cn/app/id935095138?mt=8" : "https://m.biyao.com/app", setTimeout(function() { openclient(t) }, 500) }! function() { "use strict";

    function e(t, n) {
        function i(e, t) {
            return function() {
                return e.apply(t, arguments) } }
        var a;
        if (n = n || {}, this.trackingClick = !1, this.trackingClickStart = 0, this.targetElement = null, this.touchStartX = 0, this.touchStartY = 0, this.lastTouchIdentifier = 0, this.touchBoundary = n.touchBoundary || 15, this.layer = t, this.tapDelay = n.tapDelay || 100, this.tapTimeout = n.tapTimeout || 2e3, !e.notNeeded(t)) {
            for (var s = ["onMouse", "onClick", "onTouchStart", "onTouchMove", "onTouchEnd", "onTouchCancel"], c = this, r = 0, d = s.length; d > r; r++) c[s[r]] = i(c[s[r]], c);
            o && (t.addEventListener("mouseover", this.onMouse, !0), t.addEventListener("mousedown", this.onMouse, !0), t.addEventListener("mouseup", this.onMouse, !0)), t.addEventListener("click", this.onClick, !0), t.addEventListener("touchstart", this.onTouchStart, !1), t.addEventListener("touchmove", this.onTouchMove, !1), t.addEventListener("touchend", this.onTouchEnd, !1), t.addEventListener("touchcancel", this.onTouchCancel, !1), Event.prototype.stopImmediatePropagation || (t.removeEventListener = function(e, o, n) {
                var i = Node.prototype.removeEventListener; "click" === e ? i.call(t, e, o.hijacked || o, n) : i.call(t, e, o, n) }, t.addEventListener = function(e, o, n) {
                var i = Node.prototype.addEventListener; "click" === e ? i.call(t, e, o.hijacked || (o.hijacked = function(e) { e.propagationStopped || o(e) }), n) : i.call(t, e, o, n) }), "function" == typeof t.onclick && (a = t.onclick, t.addEventListener("click", function(e) { a(e) }, !1), t.onclick = null) } }
    var t = navigator.userAgent.indexOf("Windows Phone") >= 0,
        o = navigator.userAgent.indexOf("Android") > 0 && !t,
        n = /iP(ad|hone|od)/.test(navigator.userAgent) && !t,
        i = n && /OS 4_\d(_\d)?/.test(navigator.userAgent),
        a = n && /OS [6-7]_\d/.test(navigator.userAgent),
        s = navigator.userAgent.indexOf("BB10") > 0;
    e.prototype.needsClick = function(e) {
        switch (e.nodeName.toLowerCase()) {
            case "button":
            case "select":
            case "textarea":
                if (e.disabled) return !0;
                break;
            case "input":
                if (n && "file" === e.type || e.disabled) return !0;
                break;
            case "label":
            case "iframe":
            case "video":
                return !0 }
        return /\bneedsclick\b/.test(e.className) }, e.prototype.needsFocus = function(e) {
        switch (e.nodeName.toLowerCase()) {
            case "textarea":
                return !0;
            case "select":
                return !o;
            case "input":
                switch (e.type) {
                    case "button":
                    case "checkbox":
                    case "file":
                    case "image":
                    case "radio":
                    case "submit":
                        return !1 }
                return !e.disabled && !e.readOnly;
            default:
                return /\bneedsfocus\b/.test(e.className) } }, e.prototype.sendClick = function(e, t) {
        var o, n;
        document.activeElement && document.activeElement !== e && document.activeElement.blur(), n = t.changedTouches[0], o = document.createEvent("MouseEvents"), o.initMouseEvent(this.determineEventType(e), !0, !0, window, 1, n.screenX, n.screenY, n.clientX, n.clientY, !1, !1, !1, !1, 0, null), o.forwardedTouchEvent = !0, e.dispatchEvent(o) }, e.prototype.determineEventType = function(e) {
        return o && "select" === e.tagName.toLowerCase() ? "mousedown" : "click" }, e.prototype.focus = function(e) {
        var t;
        n && e.setSelectionRange && 0 !== e.type.indexOf("date") && "time" !== e.type && "month" !== e.type ? (t = e.value.length, e.setSelectionRange(t, t)) : e.focus() }, e.prototype.updateScrollParent = function(e) {
        var t, o;
        if (t = e.fastClickScrollParent, !t || !t.contains(e)) { o = e;
            do {
                if (o.scrollHeight > o.offsetHeight) { t = o, e.fastClickScrollParent = o;
                    break }
                o = o.parentElement } while (o) }
        t && (t.fastClickLastScrollTop = t.scrollTop) }, e.prototype.getTargetElementFromEventTarget = function(e) {
        return e.nodeType === Node.TEXT_NODE ? e.parentNode : e }, e.prototype.onTouchStart = function(e) {
        var t, o, a;
        if (e.targetTouches.length > 1) return !0;
        if (t = this.getTargetElementFromEventTarget(e.target), o = e.targetTouches[0], n) {
            if (a = window.getSelection(), a.rangeCount && !a.isCollapsed) return !0;
            if (!i) {
                if (o.identifier && o.identifier === this.lastTouchIdentifier) return e.preventDefault(), !1;
                this.lastTouchIdentifier = o.identifier, this.updateScrollParent(t) } }
        return this.trackingClick = !0, this.trackingClickStart = e.timeStamp, this.targetElement = t, this.touchStartX = o.pageX, this.touchStartY = o.pageY, e.timeStamp - this.lastClickTime < this.tapDelay && e.preventDefault(), !0 }, e.prototype.touchHasMoved = function(e) {
        var t = e.changedTouches[0],
            o = this.touchBoundary;
        return Math.abs(t.pageX - this.touchStartX) > o || Math.abs(t.pageY - this.touchStartY) > o ? !0 : !1 }, e.prototype.onTouchMove = function(e) {
        return this.trackingClick ? ((this.targetElement !== this.getTargetElementFromEventTarget(e.target) || this.touchHasMoved(e)) && (this.trackingClick = !1, this.targetElement = null), !0) : !0 }, e.prototype.findControl = function(e) {
        return void 0 !== e.control ? e.control : e.htmlFor ? document.getElementById(e.htmlFor) : e.querySelector("button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea") }, e.prototype.onTouchEnd = function(e) {
        var t, s, c, r, d, l = this.targetElement;
        if (!this.trackingClick) return !0;
        if (e.timeStamp - this.lastClickTime < this.tapDelay) return this.cancelNextClick = !0, !0;
        if (e.timeStamp - this.trackingClickStart > this.tapTimeout) return !0;
        if (this.cancelNextClick = !1, this.lastClickTime = e.timeStamp, s = this.trackingClickStart, this.trackingClick = !1, this.trackingClickStart = 0, a && (d = e.changedTouches[0], l = document.elementFromPoint(d.pageX - window.pageXOffset, d.pageY - window.pageYOffset) || l, l.fastClickScrollParent = this.targetElement.fastClickScrollParent), c = l.tagName.toLowerCase(), "label" === c) {
            if (t = this.findControl(l)) {
                if (this.focus(l), o) return !1;
                l = t } } else if (this.needsFocus(l)) return e.timeStamp - s > 100 || n && window.top !== window && "input" === c ? (this.targetElement = null, !1) : (this.focus(l), this.sendClick(l, e), n && "select" === c || (this.targetElement = null), e.preventDefault(), !1);
        return n && !i && (r = l.fastClickScrollParent, r && r.fastClickLastScrollTop !== r.scrollTop) ? !0 : (this.needsClick(l) || (e.preventDefault(), this.sendClick(l, e)), !1) }, e.prototype.onTouchCancel = function() { this.trackingClick = !1, this.targetElement = null }, e.prototype.onMouse = function(e) {
        return this.targetElement ? e.forwardedTouchEvent ? !0 : e.cancelable && (!this.needsClick(this.targetElement) || this.cancelNextClick) ? (e.stopImmediatePropagation ? e.stopImmediatePropagation() : e.propagationStopped = !0, e.stopPropagation(), e.preventDefault(), !1) : !0 : !0 }, e.prototype.onClick = function(e) {
        var t;
        return this.trackingClick ? (this.targetElement = null, this.trackingClick = !1, !0) : "submit" === e.target.type && 0 === e.detail ? !0 : (t = this.onMouse(e), t || (this.targetElement = null), t) }, e.prototype.destroy = function() {
        var e = this.layer;
        o && (e.removeEventListener("mouseover", this.onMouse, !0), e.removeEventListener("mousedown", this.onMouse, !0), e.removeEventListener("mouseup", this.onMouse, !0)), e.removeEventListener("click", this.onClick, !0), e.removeEventListener("touchstart", this.onTouchStart, !1), e.removeEventListener("touchmove", this.onTouchMove, !1), e.removeEventListener("touchend", this.onTouchEnd, !1), e.removeEventListener("touchcancel", this.onTouchCancel, !1) }, e.notNeeded = function(e) {
        var t, n, i, a;
        if ("undefined" == typeof window.ontouchstart) return !0;
        if (n = +(/Chrome\/([0-9]+)/.exec(navigator.userAgent) || [, 0])[1]) {
            if (!o) return !0;
            if (t = document.querySelector("meta[name=viewport]")) {
                if (-1 !== t.content.indexOf("user-scalable=no")) return !0;
                if (n > 31 && document.documentElement.scrollWidth <= window.outerWidth) return !0 } }
        if (s && (i = navigator.userAgent.match(/Version\/([0-9]*)\.([0-9]*)/), i[1] >= 10 && i[2] >= 3 && (t = document.querySelector("meta[name=viewport]")))) {
            if (-1 !== t.content.indexOf("user-scalable=no")) return !0;
            if (document.documentElement.scrollWidth <= window.outerWidth) return !0 }
        return "none" === e.style.msTouchAction || "manipulation" === e.style.touchAction ? !0 : (a = +(/Firefox\/([0-9]+)/.exec(navigator.userAgent) || [, 0])[1], a >= 27 && (t = document.querySelector("meta[name=viewport]"), t && (-1 !== t.content.indexOf("user-scalable=no") || document.documentElement.scrollWidth <= window.outerWidth)) ? !0 : "none" === e.style.touchAction || "manipulation" === e.style.touchAction ? !0 : !1) }, e.attach = function(t, o) {
        return new e(t, o) }, "function" == typeof define && "object" == typeof define.amd && define.amd ? define(function() {
        return e }) : "undefined" != typeof module && module.exports ? (module.exports = e.attach, module.exports.FastClick = e) : window.FastClick = e }(), window.addEventListener("load", function() { FastClick.attach(document.body) }, !1),
    function(e) { "function" == typeof define && define.amd ? define(["jquery"], e) : e("object" == typeof exports ? require("jquery") : jQuery) }(function(e) {
        function t(e) {
            return c.raw ? e : encodeURIComponent(e) }

        function o(e) {
            return c.raw ? e : decodeURIComponent(e) }

        function n(e) {
            return t(c.json ? JSON.stringify(e) : String(e)) }

        function i(e) { 0 === e.indexOf('"') && (e = e.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, "\\"));
            try {
                return e = decodeURIComponent(e.replace(s, " ")), c.json ? JSON.parse(e) : e } catch (t) {} }

        function a(t, o) {
            var n = c.raw ? t : i(t);
            return e.isFunction(o) ? o(n) : n }
        var s = /\+/g,
            c = e.cookie = function(i, s, r) {
                if (void 0 !== s && !e.isFunction(s)) {
                    if (r = e.extend({}, c.defaults, r), "number" == typeof r.expires) {
                        var d = r.expires,
                            l = r.expires = new Date;
                        l.setTime(+l + 864e5 * d) }
                    return document.cookie = [t(i), "=", n(s), r.expires ? "; expires=" + r.expires.toUTCString() : "", r.path ? "; path=" + r.path : "", r.domain ? "; domain=" + r.domain : "", r.secure ? "; secure" : ""].join("") }
                for (var u = i ? void 0 : {}, p = document.cookie ? document.cookie.split("; ") : [], f = 0, h = p.length; h > f; f++) {
                    var m = p[f].split("="),
                        v = o(m.shift()),
                        g = m.join("=");
                    if (i && i === v) { u = a(g, s);
                        break }
                    i || void 0 === (g = a(g)) || (u[v] = g) }
                return u };
        c.defaults = {}, e.removeCookie = function(t, o) {
            return void 0 === e.cookie(t) ? !1 : (e.cookie(t, "", e.extend({}, o, { expires: -1 })), !e.cookie(t)) } });
var MBase = new Object;
if (MBase && ("object" != typeof MBase || MBase.NAME)) throw new Error("NameSpace 'MBase' already Exists!");
MBase = {}, MBase.NAME = "MBase", MBase.VERSION = .1, MBase.EXPORT = ["require", "importSymbols"], MBase.EXPORT_OK = ["createNamespace", "isDefined", "MBases", "globalNamespace"], MBase.globalNamespace = this, MBase.MBases = { MBase: MBase }, MBase.createNamespace = function(e, t) {
    if (!e) throw new Error("name required");
    if ("." == e.charAt(0) || "." == e.charAt(e.length - 1) || -1 != e.indexOf("..")) throw new Error("illegal name");
    for (var o = e.split("."), n = MBase.globalNamespace, i = 0; i < o.length; i++) {
        var a = o[i];
        n[a] || (n[a] = {}), n = n[a] }
    var s = n;
    if (s.NAME) throw new Error('MBase "' + e + '" is already defined');
    return s.NAME = e, t && (s.VERSION = t), MBase.MBases[e] = s, s }, window.navigator.cookieEnabled || alert("开启Cookie\r\n才能更好的体验定制哦！"), MBase.createNamespace("MBase.cookie", 1), MBase.cookie = { setCookie: function(e, t, o, n, i) {
        var a = new Date;
        a.setTime(a.getTime() + 24 * o * 60 * 60 * 1e3), document.cookie = e + "=" + escape(t) + (o ? ";expires=" + a.toGMTString() : "") + (n ? ";path=" + n : "") + (i ? ";domain=" + i : "") }, setlongcookie: function(e, t) { document.cookie = e + "=" + t + ";expires=Sat, 1 Feb 3000 00:00:00 GMT" }, getCookie: function(e) {
        return $.cookie(e) }, deleteCookie: function(e) { document.cookie = e + "=;expires=" + new Date(0).toGMTString() }, settfCookie: function(e) { null == this.getCookie("tureorfalse") && this.setCookie("tureorfalse", "", "7", "/"), this.getCookie("tureorfalse").indexOf(e) < 0 && this.setCookie("tureorfalse", this.getCookie("tureorfalse") + e, "7", "/") }, gettfCookie: function(e) {
        return null == this.getCookie("tureorfalse") ? 0 : this.getCookie("tureorfalse").indexOf(e) < 0 ? 0 : 1 }, fromAppCookie: function() {
        return null == this.getCookie("fromapp") ? 0 : this.getCookie("fromapp").split("|") } }, $("body").prepend('<input type="hidden" id="focusme" value="focus"/>'), MBase.createNamespace("MBase.OurBox", 1);
var dsq, boxconf = { isbg: 1, width: "170", height: "auto", stays: 3e3, callback: function() {} },
    OurBox = { AlertBox: function(e, t, o) {
            var n = '<div class="b_dbox_con" ><div class="b_dbox_concon">' + e + "</div></div>",
                i = '<div class="box_c box_nc" onclick="$(this).remove()">' + n + "</div>";
            $("body").append(i), $(".b_dbox_con").css({ "margin-left": -$(".b_dbox_con").width() / 2, left: "50%" }), $(".box_c")[0].addEventListener("touchmove", function(e) { e.preventDefault() }), dsq = setTimeout(function() { t && t(), $(".box_c").remove() }, o.stays) }, DetailBox: function(e, t, o) {
            var n = '<div class="box_con" style="left:50%;top:50%;width:' + o.width + "px;margin:-60px 0px 0px -" + o.width / 2 + 'px"><div class="box_contop relative"><span class="box_close"></span></div><div class="box_concon">' + e + "</div></div>",
                i = 0 == o.isbg ? "box_nc" : "",
                a = '<div class="box_c ' + i + '" onclick="$(this).remove()">' + n + "</div>";
            $("body").append(a).find(".box_close").click(function() { t && t(), $(".box_c").remove() }), $(".box_c")[0].addEventListener("touchmove", function(e) { e.preventDefault() }) }, SureBox: function(e, t, o, n) {
            var i = '<div class="box_con" style="left:50%;top:50%;width:' + n.width + "px;margin:-60px 0px 0px -" + n.width / 2 + 'px"><div class="box_contop"></div><div class="box_concon">' + e + '</div><div class="box_iorn"><div class="box_ok">确定</div></div></div>',
                a = 0 == n.isbg ? "box_nc" : "",
                s = '<div class="box_c ' + a + '">' + i + "</div>";
            $("body").append(s), $(".box_c")[0].addEventListener("touchmove", function(e) { e.preventDefault() }), $(".box_ok").click(function() { t && t(), $(".box_c").remove() }) }, sSureBox: function(e, t, o, n) {
            var i = '<div class="box_con" style="left:50%;top:50%;width:' + n.width + "px;margin:-60px 0px 0px -" + n.width / 2 + 'px"><div class="box_contop"></div><div class="box_concon">' + e + '</div><div class="box_iorn"><div class="box_ok">' + o + "</div></div></div>",
                a = 0 == n.isbg ? "box_nc" : "",
                s = '<div class="box_c ' + a + '">' + i + "</div>";
            $("body").append(s), $(".box_c")[0].addEventListener("touchmove", function(e) { e.preventDefault() }), $(".box_ok").click(function() { t && t(), $(".box_c").remove() }) }, ConfirmBox: function(e, t, o, n) {
            var i = '<div class="box_con" style="left:50%;top:50%;width:' + n.width + "px;margin:-60px 0px 0px -" + n.width / 2 + 'px"><div class="box_contop"></div><div class="box_concon">' + e + '</div><div class="box_iorn"><div class="box_cel">取消</div><div class="box_sub">确定</div></div></div>',
                a = 0 == n.isbg ? "box_nc" : "",
                s = '<div class="box_c ' + a + '" onclick="$(this).remove()">' + i + "</div>";
            $("body").append(s), $(".box_c")[0].addEventListener("touchmove", function(e) { e.preventDefault() }), $(".box_sub").click(function() { t && t(), $(".box_c").remove() }), $(".box_cel").click(function() { o && o(), $(".box_c").remove() }) }, ConfirmTipBox: function(e, t, o, n, i) {
            var a = '<div class="box_con" style="left:0;bottom:0;width:100%"><div class="box_contop"></div><div class="box_concon" style="text-align:left;font-size:15px;">' + e + '</div><div class="box_iorn"><div class="box_cel">' + n + '</div><div class="box_sub">' + i + "</div></div></div>",
                s = '<div class="box_nc" onclick="$(this).remove()">' + a + "</div>";
            $("body").append(s), $(".box_nc")[0].addEventListener("touchmove", function(e) { e.preventDefault() }), $(".box_sub").click(function() { t && t(), $(".box_nc").remove() }), $(".box_cel").click(function() { o && o(), $(".box_nc").remove() }) }, GConfirmBox: function(e, t, o) {
            var n = '<div class="box_con" style="left:50%;top:50%;width:' + boxconf.width + "px;margin:-84px 0px 0px -" + boxconf.width / 2 + 'px"><div class="box_contop"></div><div class="box_concon">' + e + '</div><div class="box_iorn"><div class="box_cel">重选镜框</div><div class="box_sub">智能推荐</div></div></div>',
                i = 0 == boxconf.isbg ? "box_nc" : "",
                a = '<div class="box_c ' + i + '" onclick="$(this).remove()">' + n + "</div>";
            $("body").append(a), $(".box_c")[0].addEventListener("touchmove", function(e) { e.preventDefault() }), $(".box_sub").click(function() { t && t(), $(".box_c").remove() }), $(".box_cel").click(function() { o && o(), $(".box_c").remove() }) }, SpConfirmBox: function(e, t, o, n, i, a) {
            var s = '<div class="box_con" style="left:50%;top:50%;width:' + a.width + "px;margin:-60px 0px 0px -" + a.width / 2 + 'px"><div class="box_contop"></div><div class="box_concon">' + e + '</div><div class="box_iorn"><div class="box_cel">' + o + '</div><div class="box_sub">' + t + "</div></div></div>",
                c = 0 == a.isbg ? "box_nc" : "",
                r = '<div class="box_c ' + c + '" onclick="$(this).remove()">' + s + "</div>";
            $("body").append(r), $(".box_c")[0].addEventListener("touchmove", function(e) { e.preventDefault() }), $(".box_sub").click(function() { n && n(), $(".box_c").remove() }), $(".box_cel").click(function() { i && i(), $(".box_c").remove() }) }, alert: function(e, t, o) { $(".box_c").remove(), $("#focusme").focus();
            var n = ($(window).width() > 640 ? 430 : $(window).width()) / 3 * 2;
            boxconf = $.extend(boxconf, o), boxconf.width < n && (boxconf.width = n); "" != dsq && clearTimeout(dsq), this.AlertBox(e, t, boxconf) }, detail: function(e, t, o) {
            var n = ($(window).width() > 640 ? 430 : $(window).width()) / 3 * 2;
            boxconf = $.extend(boxconf, o), boxconf.width < n && (boxconf.width = n), this.DetailBox(e, t, boxconf) }, sure: function(e, t, o, n) {
            var i = ($(window).width() > 640 ? 430 : $(window).width()) / 3 * 2;
            boxconf = $.extend(boxconf, n), boxconf.width < i && (boxconf.width = i), this.SureBox(e, t, o, boxconf) }, ssure: function(e, t, o, n) {
            var i = ($(window).width() > 640 ? 430 : $(window).width()) / 3 * 2;
            boxconf = $.extend(boxconf, n), boxconf.width < i && (boxconf.width = i), this.sSureBox(e, t, o, boxconf) }, confirm: function(e, t, o, n) {
            var i = ($(window).width() > 640 ? 430 : $(window).width()) / 3 * 2;
            boxconf = $.extend(boxconf, n), boxconf.width < i && (boxconf.width = i), this.ConfirmBox(e, t, o, boxconf) }, confirmTip: function(e, t, o, n, i, a) { console.log("cbt:" + n + "----fbt:" + i);
            var s = ($(window).width() > 640 ? 430 : $(window).width()) / 3 * 2;
            boxconf = $.extend(boxconf, a), boxconf.width < s && (boxconf.width = s), this.ConfirmTipBox(e, t, o, n, i, boxconf) }, gconfirm: function(e, t, o, n) {
            var i = ($(window).width() > 640 ? 430 : $(window).width()) / 3 * 2;
            boxconf = $.extend(boxconf, n), boxconf.width < i && (boxconf.width = i), this.GConfirmBox(e, t, o, boxconf) }, spconfirm: function(e, t, o, n, i, a) {
            var s = ($(window).width() > 640 ? 430 : $(window).width()) / 3 * 2;
            boxconf = $.extend(boxconf, a), boxconf.width < s && (boxconf.width = s), this.SpConfirmBox(e, t, o, n, i, boxconf) } };
MBase.createNamespace("MBase.active", 1), MBase.active = { addactive: function() { $(".touri,.m_menu,.m_goback").each(function() {
            var e = $(this);
            e[0].addEventListener("touchstart", function() { e.addClass("activeopa") }, !1), e[0].addEventListener("touchmove", function() { e.removeClass("activeopa") }, !1), e[0].addEventListener("touchend", function() { e.removeClass("activeopa") }, !1) }), $("input").each(function() {
            var e = $(this);
            e[0].addEventListener("touchstart", function() { e.css("opacity", "0.9") }, !1), e[0].addEventListener("touchmove", function() { e.css("opacity", "1") }, !1), e[0].addEventListener("touchend", function() { e.css("opacity", "1") }, !1) }) }, addotheract: function(e, t) { void 0 != e && e.length > 0 && e.each(function() {
            var e = $(this),
                o = null;
            e[0].addEventListener("touchstart", function() { o = setTimeout(function() { e.addClass(1 == t ? "activeopa1" : "activeopa") }, 60) }, !1), e[0].addEventListener("touchmove", function() { clearTimeout(o), e.removeClass("activeopa1 activeopa2 activeopa3 activeopa") }, !1), e[0].addEventListener("touchend", function() { setTimeout(function() { e.removeClass("activeopa1 activeopa2 activeopa3 activeopa") }, 150) }, !1) }) } }, "" != window.location.hash && (window.location.hash = "normal");
var ua = navigator.userAgent.toLowerCase(),
    iswx = 0,
    isqq = 0,
    isqqweb = 0,
    isuc = 0,
    isinapp = 0,
    isios = 0,
    isandroid = 0,
    newApp = 0;
"micromessenger" == ua.match(/MicroMessenger/i) && (iswx = 1), "mqqbrowser" == ua.match(/MQQBrowser/i) && (isqq = 1), "ucbrowser" == ua.match(/UCBrowser/i) && (isuc = 1), ua.indexOf("qq/") > -1 && (isqqweb = 1), (ua.match("ipad") || ua.match("iphone") || ua.match("ipod")) && (isios = 1), ua.match("android") && (isandroid = 1), void 0 != getCookie("fromapp") && "" != getCookie("fromapp") && null != getCookie("fromapp") && (isinapp = 1), void 0 != getCookie("newApp") && "" != getCookie("newApp") && null != getCookie("newApp") && (newApp = 1);
var stoptouch = function(e) { e.preventDefault() },
    addappnav = function(e) { 1 == isinapp && MBase.cookie.fromAppCookie().length > 1 && MBase.cookie.fromAppCookie()[1] > 10 && ($("body").append('<nav class="appnav"><a href="' + window.ControllerSite + '/index"><span class="m_a_p1"></span>首页</a><a href="' + window.ControllerSite + '/cart/list.html"><span class="m_a_p2"></span>购物车</a><a href="' + window.ControllerSite + '/booklist"><span class="m_a_p4"></span>我的预约</a><a href="' + window.ControllerSite + '/account/mine"><span class="m_a_p3"></span>我的必要</a></nav>'), e()) };
$("#logina").attr("touri", window.ControllerSite + "/account/login?returnUrl=" + window.location.href), 1 == isinapp || "milife" == getCookie("channel") ? $(".hidfoot,.m_f_bottomre").remove() : $(".hidfoot").css("display", "block");
var control = navigator.control || {};
control.gesture && control.gesture(!1), $("#min_hdiv").css("min-height", $(window).height() - 120 + "px"), $(document).on("click", ".touri", function() { "" != $(this).attr("touri") && (window.location.href = $(this).attr("touri")) }), $(document).on("click", ".totop", function() { window.scrollTo(0, 0) }), $(".m_menu").click(function() {alert("111")});
try {
    if (location.href.indexOf("com/app") > -1 && location.href.indexOf("com/appindex") < 0);
    else if (-1 == parent.location.href.indexOf("#mmlogin") && window.location.href.length < 300) {
        var ssdata = getCookie("gobackuri"),
            locationhref = window.location.href;
        if ($(".isindex").length > 0 || $(".nobackuri").length > 0) setCookie("gobackuri", "", "0", "/", window.mdomain);
        else {
            if (void 0 != ssdata && null != ssdata && "" != ssdata) {
                var budata = ssdata.split("~");
                if (budata.length >= 2 && budata[budata.length - 2] == location.href) {
                    var newssdata = getCookie("gobackuri").substring(0, getCookie("gobackuri").lastIndexOf("~"));
                    setCookie("gobackuri", newssdata, "1", "/", window.mdomain) } else budata[budata.length - 1] != location.href && setCookie("gobackuri", getCookie("gobackuri") + "~" + location.href, "1", "/", window.mdomain);
                if (budata.length > 9) {
                    var predc1 = getCookie("gobackuri").substring(getCookie("gobackuri").indexOf("~") + 1, getCookie("gobackuri").length),
                        predc2 = predc1.substring(predc1.indexOf("~") + 1, predc1.length),
                        predc3 = window.ControllerSite + "/index~" + predc2;
                    setCookie("gobackuri", predc3, "1", "/", window.mdomain) } } else setCookie("gobackuri", window.ControllerSite + "/index~" + location.href, "1", "/", window.mdomain);
            $(".m_goback,.goback_mini").click(function() {
                var e = getCookie("gobackuri").substring(0, getCookie("gobackuri").lastIndexOf("~"));
                setCookie("gobackuri", e, "1", "/", window.mdomain), window.location.href = locationhref.indexOf("address/addre") > 0 ? window.ControllerSite + "/shopcar/list" : e.substring(parseInt(e.lastIndexOf("~")) + 1) }) } } } catch (e) {}
if (MBase.createNamespace("MBase.urido", 1), MBase.urido = { geturipra: function() {
            var e = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"),
                t = window.location.search.substr(1).match(e);
            return null != t ? t[2] : "" } }, MBase.createNamespace("MBase.account", 1), MBase.account = { islogin: function() {
            return null != getCookie("uid") && null != getCookie("token") ? !0 : !1 }, logintap: function(e) { 1 == isinapp && 1 == MBase.cookie.fromAppCookie().length ? MBase.toapp.applogin({}) : ($("body").append('<div class="tap_bg"><div class="tap_content"><iframe allowtransparency="true" style="background-color:rgba(0,0,0,0)" src="' + window.ControllerSite + "/account/login?loginfrom=" + e + '" width="100%" height="100%" frameborder="0" scrolling="yes"></iframe></div></div>'), $("#by_w").addClass("none_im"), document.body.scrollTop = 0) } }, MBase.createNamespace("MBase.toapp", 1), MBase.toapp = { connectWebViewJavascriptBridge: function(e) { window.WebViewJavascriptBridge ? e(WebViewJavascriptBridge) : document.addEventListener("WebViewJavascriptBridgeReady", function() { e(WebViewJavascriptBridge) }, !1) }, istoapp: function(e) {
            try {
                var t = (navigator.userAgent.toLowerCase(), navigator.userAgent.match("iPad") || navigator.userAgent.match("iPhone") || navigator.userAgent.match("iPod")),
                    o = navigator.userAgent.match("Android");
                t && this.connectWebViewJavascriptBridge(function(t) { t.send(e) }), o && window.BYLinkAppInterface.linkAndroidApp(JSON.stringify(e)) } catch (n) { alert(n.message) } }, appdesigndetail: function(e) {
            (void 0 == e || null == e || "" == e) && (e = {}), this.istoapp({ type: 1, des: "designDetail", values: e }) }, applogin: function(e) {
            (void 0 == e || null == e || "" == e) && (e = {}), this.istoapp({ type: 2, des: "login", values: e }) }, applogout: function(e) {
            (void 0 == e || null == e || "" == e) && (e = {}), this.istoapp({ type: 3, des: "designDetail", values: e }) }, appshowmessagelist: function(e) {
            (void 0 == e || null == e || "" == e) && (e = {}), this.istoapp({ type: 4, des: "showMessagelist", values: e }) }, appbookcheckout: function(e) {
            (void 0 == e || null == e || "" == e) && (e = {}), this.istoapp({ type: 5, des: "bookCheckout", values: e }) }, apppreloaddesigns: function(e) {
            (void 0 == e || null == e || "" == e) && (e = {}), this.istoapp({ type: 6, des: "preloadDesigns", values: e }) }, apptohomepage: function(e) {
            (void 0 == e || null == e || "" == e) && (e = {}), this.istoapp({ type: 7, des: "toHomepage", values: e }) }, apptobookpage: function(e) {
            (void 0 == e || null == e || "" == e) && (e = {}), this.istoapp({ type: 8, des: "toBookpage", values: e }) }, apptoregistpage: function(e) {
            (void 0 == e || null == e || "" == e) && (e = {}), this.istoapp({ type: 9, des: "toRegistPage", values: e }) }, apptoshare: function(e) {
            (void 0 == e || null == e || "" == e) && (e = {}), this.istoapp({ type: 10, des: "toShare", values: e }) }, apptoset: function(e) {
            (void 0 == e || null == e || "" == e) && (e = {}), this.istoapp({ type: 11, des: "toSet", values: e }) }, apptowxauth: function(e) {
            (void 0 == e || null == e || "" == e) && (e = {}), this.istoapp({ type: 12, des: "appTowxAuth", values: e }) }, glasswearing: function(e) {
            (void 0 == e || null == e || "" == e) && (e = {}), this.istoapp({ type: 13, des: "glassWearing", values: e }) }, pageclose: function(e) {
            (void 0 == e || null == e || "" == e) && (e = {}), this.istoapp({ type: 15, des: "pageclose", values: e }) }, implace: function(e) {
            (void 0 == e || null == e || "" == e) && (e = {}), this.istoapp({ type: 16, des: "IMplace", values: e }) }, zoomoutimg: function(e) {
            (void 0 == e || null == e || "" == e) && (e = {}), this.istoapp({ type: 17, des: "ZoomOutimg", values: e }) }, enterAr: function(e) {
            var t = e ? e : {};
            this.istoapp({ type: 18, des: "enterAR", values: t }) }, appCarve: function(e) {
            var t = e ? e : {};
            this.istoapp({ type: 19, des: "appCarve", values: t }) }, appJumpType: function(e) {
            var t = e ? e : {};
            this.istoapp({ type: 20, des: "appJumpType", values: t }) }, appTitle: function(e) {
            var t = e ? e : {};
            this.istoapp({ type: 21, des: "appTitle", values: t }) } }, MBase.createNamespace("MBase.timelag", 1), MBase.timelag = { formatTime: function(e) {
            var t = parseInt(e / 1e3 / 60 / 60),
                o = parseInt(e / 1e3 / 60 % 60),
                n = parseInt(e / 1e3 % 60);
            return t + " 时 " + o + " 分 " + n + " 秒后" } }, Date.prototype.Format = function(e) {
        var t = { "M+": this.getMonth() + 1, "d+": this.getDate(), "h+": this.getHours(), "m+": this.getMinutes(), "s+": this.getSeconds(), "q+": Math.floor((this.getMonth() + 3) / 3), S: this.getMilliseconds() }; /(y+)/.test(e) && (e = e.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length)));
        for (var o in t) new RegExp("(" + o + ")").test(e) && (e = e.replace(RegExp.$1, 1 == RegExp.$1.length ? t[o] : ("00" + t[o]).substr(("" + t[o]).length)));
        return e }, MBase.createNamespace("MBase.myurlEncode", 1), MBase.myurlEncode = { encode: function(e) {
            return e = (e + "").toString(), encodeURIComponent(e).replace(/!/g, "%21").replace(/'/g, "%27").replace(/\(/g, "%28").replace(/\)/g, "%29").replace(/\*/g, "%2A").replace(/%20/g, "+") } }, MBase.createNamespace("MBase.getScrollTop", 1), MBase.getScrollTop = { scrolltop: function() {
            var e = 0;
            return document.documentElement && document.documentElement.scrollTop ? e = document.documentElement.scrollTop : document.body && (e = document.body.scrollTop), e } }, MBase.createNamespace("MBase.m", 1), MBase.m = { log: function(e) { $.ajax({ dataType: "jsonp", type: "post", jsonp: "jsonpcallback", data: "", url: window.ControllerSite + "/common/logger?contents=" + e.toString(), contentType: "application/x-www-form-urlencoded;charset=utf-8", success: function() {}, error: function() {} }) }, maidian: function(e) {
            var t = { lt: "webpv", lv: .1, uuid: getCookie("uuid"), src: void 0 == getCookie("channel") ? "biyao" : getCookie("channel"), pf: "mweb", times: (new Date).getTime() };
            e && $.extend(t, e);
            var o = "https://track.biyao.com/by.gif?";
            for (var n in t) o += n + "=" + t[n] + "&";
            o += "fbase=mweb", $("body").append('<img style="display:none" src="' + o + '"/>') } }, parent.location.href.indexOf("#mmlogin") > -1 && ($(".m_goback,.m_menu,.m_f_bottomre").remove(), $(".m_pagetop").append("<span class=\"m_gobackz\" onclick=\"$('.m_dlzc').focus();parent.history.pushState({},'',parent.location.href.substring(0,parent.location.href.indexOf('#')));parent.$(window.parent.document).find('#by_w').removeClass('none_im');parent.$(window.parent.document).find('.tap_bg').remove();\"></span>")), "" != getQueryString("it")) {
    var ss = "";
    isinapp && (ss = MBase.cookie.fromAppCookie()[0] + "_");
    var channel = ss + getQueryString("it");
    setCookie("channel", channel, 7, "/", window.mdomain) }
var t, config = { scheme_IOS: "biyao:open", scheme_Adr: "suibian://biyao", timeout: 600 };
if ($(".downapp").bind("click", function() { gotodown() }), "" != getCookie("uid") && null != getCookie("uid")) {
    var userinfo = getCookie("userinfo");
    if ("" != userinfo && null != userinfo) {
        var userinfos = userinfo.split(",");
        if (userinfos.length > 0) {
            var nickname = userinfos[0];
            11 == nickname.length && (nickname = nickname.substring(0, 3) + "***" + nickname.substring(7, 11)), $(".m_f_top").html('<span class="f_l pad_5 col_666 escp m_nickname">' + nickname + '</span><span class="f_l col_666 pad_m_5">&nbsp;丨&nbsp;</span><a class="touri f_l pad_5 col_666" touri="' + window.ControllerSite + '/account/logout">退出</a><input type="hidden" id="islogin" value="true"/><a class="f_r col_666 pointer pad_5 totop"><span>回顶部</span></a><span class="f_r col_666 pad_m_5">&nbsp;丨&nbsp;</span><a class="f_r col_666 pointer pad_5 touri" touri="' + window.ControllerSite + '/supplier/mini?url_param=ljby"><span>关于必要</span></a>') } } } else setCookie("userinfo", "", "0", "/", window.mdomain);
